package com.netas.kekmanager.dao.model;

import com.netas.kekmanager.dao.*;
import com.netas.kekmanager.dao.factory.*;
import com.netas.kekmanager.dao.exceptions.*;
import java.io.Serializable;
import java.util.*;
import java.util.Date;

public class Feedback implements Serializable
{
	/** 
	 * This attribute maps to the column id in the feedback table.
	 */
	protected int id;

	/** 
	 * This attribute maps to the column userID in the feedback table.
	 */
	protected int userID;

	/** 
	 * This attribute maps to the column text in the feedback table.
	 */
	protected String text;

	/** 
	 * This attribute represents whether the primitive attribute text is null.
	 */
	protected boolean textNull = true;

	/** 
	 * This attribute maps to the column date in the feedback table.
	 */
	protected Date date;

	/** 
	 * This attribute maps to the column processed in the feedback table.
	 */
	protected int processed;

	/** 
	 * This attribute represents whether the primitive attribute processed is null.
	 */
	protected boolean processedNull = true;
        
        protected String userText;

	/**
	 * Method 'Feedback'
	 * 
	 */
	public Feedback()
	{
	}

    public String getUserText() {
        return userText;
    }

    public void setUserText(String userText) {
        this.userText = userText;
    }

	/**
	 * Method 'getId'
	 * 
	 * @return int
	 */
	public int getId()
	{
		return id;
	}

	/**
	 * Method 'setId'
	 * 
	 * @param id
	 */
	public void setId(int id)
	{
		this.id = id;
	}

	/**
	 * Method 'getUserID'
	 * 
	 * @return int
	 */
	public int getUserID()
	{
		return userID;
	}

	/**
	 * Method 'setUserID'
	 * 
	 * @param userID
	 */
	public void setUserID(int userID)
	{
		this.userID = userID;
	}

	/**
	 * Method 'getText'
	 * 
	 * @return int
	 */
	public String getText()
	{
		return text;
	}

	/**
	 * Method 'setText'
	 * 
	 * @param text
	 */
	public void setText(String text)
	{
		this.text = text;
		this.textNull = false;
	}

	/**
	 * Method 'setTextNull'
	 * 
	 * @param value
	 */
	public void setTextNull(boolean value)
	{
		this.textNull = value;
	}

	/**
	 * Method 'isTextNull'
	 * 
	 * @return boolean
	 */
	public boolean isTextNull()
	{
		return textNull;
	}

	/**
	 * Method 'getDate'
	 * 
	 * @return Date
	 */
	public Date getDate()
	{
		return date;
	}

	/**
	 * Method 'setDate'
	 * 
	 * @param date
	 */
	public void setDate(Date date)
	{
		this.date = date;
	}

	/**
	 * Method 'getProcessed'
	 * 
	 * @return int
	 */
	public int getProcessed()
	{
		return processed;
	}

	/**
	 * Method 'setProcessed'
	 * 
	 * @param processed
	 */
	public void setProcessed(int processed)
	{
		this.processed = processed;
		this.processedNull = false;
	}

	/**
	 * Method 'setProcessedNull'
	 * 
	 * @param value
	 */
	public void setProcessedNull(boolean value)
	{
		this.processedNull = value;
	}

	/**
	 * Method 'isProcessedNull'
	 * 
	 * @return boolean
	 */
	public boolean isProcessedNull()
	{
		return processedNull;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof Feedback)) {
			return false;
		}
		
		final Feedback _cast = (Feedback) _other;
		if (id != _cast.id) {
			return false;
		}
		
		if (userID != _cast.userID) {
			return false;
		}
		
		if (text != _cast.text) {
			return false;
		}
		
		if (textNull != _cast.textNull) {
			return false;
		}
		
		if (date == null ? _cast.date != date : !date.equals( _cast.date )) {
			return false;
		}
		
		if (processed != _cast.processed) {
			return false;
		}
		
		if (processedNull != _cast.processedNull) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + id;
		_hashCode = 29 * _hashCode + userID;
		_hashCode = 29 * _hashCode + (textNull ? 1 : 0);
		if (date != null) {
			_hashCode = 29 * _hashCode + date.hashCode();
		}
		
		_hashCode = 29 * _hashCode + processed;
		_hashCode = 29 * _hashCode + (processedNull ? 1 : 0);
		return _hashCode;
	}

	/**
	 * Method 'createPk'
	 * 
	 * @return FeedbackPk
	 */
	public FeedbackPk createPk()
	{
		return new FeedbackPk(id);
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "com.netas.kekmanager.dao.dto.Feedback: " );
		ret.append( "id=" + id );
		ret.append( ", userID=" + userID );
		ret.append( ", text=" + text );
		ret.append( ", date=" + date );
		ret.append( ", processed=" + processed );
		return ret.toString();
	}

}
